﻿@using SunTzu.Utility;
@model form_visitor
@{
    ViewBag.Title = "参会回执审核";
    Layout = "~/Areas/Admin/Views/Shared/_RightLayout.cshtml";
    List<int> areas = new List<int>();
    if (!string.IsNullOrEmpty(Model.Area))
    {
        areas.AddRange(Model.Area.Split(',').Select(c => c.ParseToInt()));
    }
    List<int> services = new List<int>();
    if (!string.IsNullOrEmpty(Model.Service))
    {
        services.AddRange(Model.Service.Split(',').Select(c => c.ParseToInt()));
    }
    List<int> scopes = new List<int>();
    if (!string.IsNullOrEmpty(Model.Scope))
    {
        scopes.AddRange(Model.Scope.Split(',').Select(c => c.ParseToInt()));
    }
    
    List<int> purposeNeeds = new List<int>();
    if (!string.IsNullOrEmpty(Model.PurposeNeed))
    {
        purposeNeeds.AddRange(Model.PurposeNeed.Split(',').Select(c => c.ParseToInt()));
    }
    List<int> purposeOffers = new List<int>();
    if (!string.IsNullOrEmpty(Model.PurposeOffer))
    {
        purposeOffers.AddRange(Model.PurposeOffer.Split(',').Select(c => c.ParseToInt()));
    }
}

	<form id="editForm" name="editForm" method="post" action="/FormVisitor/Approve/?id=@Model.Id">
	<div id="panelBar">
		<ul class="toolBar">
			<li><input class="submit" type="submit" value="确认审核" /></li>
			<li><a class="back" href="javascript:void(0)"><span>返回</span></a></li>
		</ul>
	</div>
	<div id="edit">
		<ul>
            <li> 
				<span class="label">公司名称：</span>
                <span class="required">
                    <input id="Title" name="Title" type="text" value="@Model.Title" title="请输入" /> 
                </span>
			</li> 
            <li> 
				<span class="label">公司地址：</span>
                <span class="required">
                    <input id="Address" name="Address" type="text" value="@Model.Address" title="请输入" /> 
                </span>
			</li> 
            <li> 
				<span class="label">国家/地区：</span>
                <span class="required">
                    <input id="Region" name="Region" type="text" value="@Model.Region" title="请输入" /> 
                </span>
			</li> 
            <li> 
				<span class="label">邮政编码：</span>
                <span class="required">
                    <input id="PostCode" name="PostCode" type="text" value="@Model.PostCode" title="请输入" /> 
                </span>
			</li> 
            <li> 
				<span class="label">电话：</span>
                <span class="required">
                    <input id="Tel" name="Tel" type="text" value="@Model.Tel" title="请输入" /> 
                </span>
			</li> 
            <li> 
				<span class="label">传真：</span>
                <span >
                    <input id="Fax" name="Fax" type="text" value="@Model.Fax"  title="请输入" /> 
                </span>
			</li> 
            <li> 
				<span class="label">网址：</span>
                <span >
                    <input id="Url" name="Url" type="text" value="@Model.Url"  title="请输入" /> 
                </span>
			</li> 
            <li> 
				<span class="label">成立年份：</span>
                <span class="required">
                    <input id="Year" name="Year" type="text" value="@Model.Year" title="请输入" /> 
                </span>
			</li> 
            <li> 
				<span class="label">年营业额：</span>
                <span class="required">
                    <input id="Revenue" name="Revenue" type="text" value="@Model.Revenue" title="请输入" /> 
                </span>
			</li> 
            <li> 
				<span class="label">主营项目：</span>
                <span class="required">
                    <input id="MainBussiness" name="MainBussiness" type="text" value="@Model.MainBussiness" title="请输入" /> 
                </span>
			</li> 
            <li> 
				<span class="label">参会人1：</span>
                <span class="required">
                    <input id="MainContacter" name="MainContacter" type="text" value="@Model.MainContacter" title="请输入" /> 
                    <input type="radio" value="True" name="MainContacterGender" @(Model.MainContacterGender ? "checked" : "") /> 先生
                    <input type="radio" value="False" name="MainContacterGender" @(!Model.MainContacterGender ? "checked" : "") /> 女士
                </span>
			</li> 
            <li> 
				<span class="label">职务：</span>
                <span>
                    <input id="MainContacterTitle" name="MainContacterTitle" type="text" value="@Model.MainContacterTitle" title="请输入" /> 
                </span>
			</li> 
            <li> 
				<span class="label">移动电话：</span>
                <span class="required">
                    <input id="MainContacterMobile" name="MainContacterMobile" type="text" value="@Model.MainContacterMobile" title="请输入" /> 
                </span>
			</li> 
            <li> 
				<span class="label">电子邮箱：</span>
                <span class="required">
                    <input id="MainContacterEmail" name="MainContacterEmail" type="text" value="@Model.MainContacterEmail" title="请输入" /> 
                </span>
			</li> 
            <li> 
				<span class="label">参会人员2：</span>
                <span class="required">
                    <input id="Contacter" name="Contacter" type="text" value="@Model.Contacter" title="请输入" /> 
                    <input type="radio" value="True" name="ContacterGender" @(Model.ContacterGender ? "checked" : "") /> 先生
                    <input type="radio" value="False" name="ContacterGender" @(!Model.ContacterGender ? "checked" : "") /> 女士
                </span>
			</li> 
            <li> 
				<span class="label">职务：</span>
                <span class="required">
                    <input id="ContacterTitle" name="ContacterTitle" type="text" value="@Model.ContacterTitle" title="请输入" /> 
                </span>
			</li> 
            <li> 
				<span class="label">移动电话：</span>
                <span class="required">
                    <input id="ContacterMobile" name="ContacterMobile" type="text" value="@Model.ContacterMobile" title="请输入" /> 
                </span>
			</li> 
            <li> 
				<span class="label">电子邮箱：</span>
                <span class="required">
                    <input id="ContacterEmail" name="ContacterEmail" type="text" value="@Model.ContacterEmail" title="请输入" /> 
                </span>
			</li> 
            <li> 
				<span class="label">业务范围：</span>
                <span >
                    <ul class="multiSelections">
                    @foreach (var scope in CacheHelper<code_scope>.GetAll().OrderBy(c => c.Order))
                    {
                        <li @(scope.Title == "其他" ? "class=multiSelectionInput" : "")>
                            <input type="checkbox" @(scopes.Contains(scope.Id) ? "checked" : "") name="Scope" value="@scope.Id" /> @scope.Title
                            @if (scope.Title == "其他")
                            {
                            <input type="text" name="ScopeOtherName" class="inputNormal" value="@Model.ScopeOtherName" />
                            }
                        </li>
                    }
                    </ul>
                </span>
			</li> 


            <li> 
				<span class="label">关注展区：</span>
                <span>
                    <ul class="multiSelections">
                    @foreach (var area in CacheHelper<code_area>.GetAll().OrderBy(c => c.Order))
                    {
                        <li @(area.Title == "其他" ? "class=multiSelectionInput" : "")>
                            <input type="checkbox" @(areas.Contains(area.Id) ? "checked" : "") name="Area" value="@area.Id" /> @area.Title
                        </li>
                    }
                    </ul>
                </span>
			</li> 
            <li> 
				<span class="label">预计参会时间：</span>
                <span class="required">
                    <input type="text" name="StartDate" id="StartDate" value="@(Model.StartDate.HasValue ? Model.StartDate.Value.ToString("yyyy-MM-dd") : "")" />
                    至
                    <input type="text" name="EndDate" id="EndDate" value="@(Model.EndDate.HasValue ? Model.StartDate.Value.ToString("yyyy-MM-dd") : "")" />
                </span>
			</li> 
            <li> 
				<span class="label">参会需求（寻求）：</span>
                <span >
                    <ul class="multiSelections">
                    @foreach (var purpose in CacheHelper<code_purpose>.GetAll().OrderBy(c => c.Order))
                    {
                        <li @(purpose.Title == "其他" ? "class=multiSelectionInput" : "")>
                            <input type="checkbox" @(purposeNeeds.Contains(purpose.Id) ? "checked" : "") name="PurposeNeed" value="@purpose.Id" /> @purpose.Title
                        </li>
                    }
                    </ul>
                </span>
			</li> 
            <li> 
				<span class="label">参会需求（提供）：</span>
                <span >
                    <ul class="multiSelections">
                    @foreach (var purpose in CacheHelper<code_purpose>.GetAll().OrderBy(c => c.Order))
                    {
                        <li @(purpose.Title == "其他" ? "class=multiSelectionInput" : "")>
                            <input type="checkbox" @(purposeOffers.Contains(purpose.Id) ? "checked" : "") name="PurposeOffer" value="@purpose.Id" /> @purpose.Title
                        </li>
                    }
                    </ul>
                </span>
			</li> 
            <li> 
				<span class="label">信息标题：</span>
                <span class="required">
                    <input id="RequirementTitle" name="RequirementTitle" type="text" value="@Model.RequirementTitle" title="请输入" /> 
                </span>
			</li> 
            <li> 
				<span class="label">具体需求信息：</span>
                <span class="required">
                    <input id="Requirement" name="Requirement" type="text" value="@Model.Requirement" title="请输入" /> 
                </span>
			</li> 
            <li> 
				<span class="label">最少交易/投资金额：</span>
                <span class="required">
                    <input id="Amount" name="Amount" type="text" value="@Model.Amount" title="请输入" /> 
                </span>
			</li> 
            <li> 
				<span class="label">提供宣传单/宣传手册/产品样本？：</span>
                <span >
                    <input type="radio" name="IsSampleProvided" @(Model.IsSampleProvided ? "checked" : "") value="True" /> 是
                    <input type="radio" name="IsSampleProvided" @(!Model.IsSampleProvided ? "checked" : "") value="False"/> 否
                </span>
			</li> 

            <li> 
				<span class="label">展会服务？：</span>
                <span >
                    <ul class="multiSelections">
                    @foreach (var service in CacheHelper<code_service>.GetAll().OrderBy(c => c.Order))
                    {
                        <li @(service.Title == "其他" ? "class=multiSelectionInput" : "")>
                            <input type="checkbox" @(services.Contains(service.Id) ? "checked" : "") name="Service" value="@service.Id" /> @service.Title
                            @if (service.Title == "其他")
                            {
                            <input type="text" name="ServiceOtherName" class="inputNormal" value="@Model.ServiceOtherName" />
                            }
                        </li>
                    }
                    </ul>
                </span>
			</li> 
            <li> 
				<span class="label">推荐媒体（网站）：</span>
                <span >
                    <input id="MediaWebSite" name="MediaWebSite" type="text" value="@Model.MediaWebSite"  title="请输入" /> 
                </span>
			</li> 
            <li> 
				<span class="label">推荐媒体（期刊）：</span>
                <span >
                    <input id="MediaPublication" name="MediaPublication" type="text" value="@Model.MediaPublication"  title="请输入" /> 
                </span>
			</li> 
            <li> 
				<span class="label">推荐媒体（杂志）：</span>
                <span >
                    <input id="MediaJournal" name="MediaJournal" type="text" value="@Model.MediaJournal"  title="请输入" /> 
                </span>
			</li> 
            <li> 
				<span class="label">推荐媒体（其他）：</span>
                <span >
                    <input id="MediaOther" name="MediaOther" type="text" value="@Model.MediaOther"  title="请输入" /> 
                </span>
			</li> 
            <li> 
				<span class="label">接收邮件：</span>
                <span >
                    <input type="radio" name="IsReceiveEmail" @(Model.IsReceiveEmail ? "checked" : "") value="True" /> 是
                    <input type="radio" name="IsReceiveEmail" @(!Model.IsReceiveEmail ? "checked" : "") value="False"/> 否
                </span>
			</li> 
		</ul>
	</div>
	</form>
